package models;

import java.util.*;

import javax.persistence.*;

import play.data.validation.Required;
import play.db.jpa.Model;
import sun.awt.windows.ThemeReader;
/**
 * This entity is created to keep track of all topic requests sent.
 * 
 * @author Shahir El Faramawy
 *
 */
@Entity
public class Request extends Model {
	/**
	 * the title of the request
	 * @author Shahir El Faramawy
	 */
	@Required
	public String title;
	/**
	 * the body of the request
	 * @author Shahir El Faramawy
	 */
	@Required
	public String body;
	
	 /** The entity  to which the request will be sent to its organizer and organization lead.
	 * @author Shahir El Faramawy
	 */
	@ManyToOne
	public Entities entityRequest;
	/**
	 * The sender of the request
	 * @author Shahir El Faramawy
	 */
	@ManyToOne
	public User sender;
	
	
	
	/**
	 *
	 * @param title
	 * 			The title of the request.
	 * @param body
	 * 			The body of the request.
	 * @param entityRequest
	 * 			The entity  to which the topic requests will be sent.
	 * @param sender
	 * 			The sender of the request
	 * 
	 * @author Shahir El Faramawy
	 */

	public Request(String title, String body,Entities entityRequest, User sender) {
		this.title = title;
		this.body = body;
		this.entityRequest=entityRequest;
		this.sender=sender;
	}

}
